#define  _CRT_SECURE_NO_WARNINGS 1		
#include <stdio.h>
int main() {
    int a, b, c, x;
    scanf("%d", &x);
    a = x / 3600;
    b = (x - a * 3600) / 60;
    c = x - a * 3600 - b * 60;
    printf("%d %d %d", a, b, c);
    return 0;
}
#include <stdio.h>

int main() {
    int a, b,c,x;
    scanf("%d",&x);
    a=x/3600;
    b=x%3600/60;
    c=x%3600%60;
    printf("%d %d %d",a,b,c);
    return 0;
}